package com.rk.msm.receiver;

import com.rk.common.constant.MqConst;
import com.rk.hosp.vo.msm.MsmVo;
import com.rk.msm.service.MsmService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author :Rk.
 * @date : 2022/12/6
 */
@Component
@RabbitListener(queues = MqConst.QUEUE_MSM)
public class MSMReceiver {


    @Autowired
    private MsmService msmService;

    @RabbitHandler
    public void process(MsmVo msmVo){
        System.out.println("短信消费者收到的消息为:"+msmVo);
        System.err.println(msmVo.getPhone());
    }

}
